﻿// Extension of generic Sprite class that looks like falling snow

class com.spikything.gfx3d.Snow extends com.spikything.gfx3d.Sprite {

	var f	:Number;	// Friction
	var g	:Number;	// Gravity

	function Snow () {
		super();
		vx = random(5)-2;
		vy = 0;
		vz = random(5)-2;
		f = .95;
		g = 1;
	}

	public function update () {
		vy += g;
		vx *= f;
		vy *= f;
		vz *= f;
		super.update();
		if (y>=250) y = -250;
	}

}